package com.hhkj.admin.question.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BizBaseEntity;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.valid.VAdd;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.valid.VEdit;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 题目问题反馈对象 t_problem_feedback
 * 
 * @author ruoyi
 * @since 2024-08-09
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_problem_feedback")
public class ProblemFeedback extends BizBaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 错误类型 sys_dict_data 表的 dict_code 字段 */
    @Excel(name = "错误类型 sys_dict_data 表的 dict_code 字段")
    @NotNull(message = "错误类型不能为空", groups = {VAdd.class})
    private Long mistakeType;

    /** 题目id 关联 t_question 表的 id 字段 */
    @Excel(name = "题目id 关联 t_question 表的 id 字段")
    @NotNull(message = "题目id不能为空", groups = {VAdd.class})
    private Long questionId;

    /** 问题描述 */
    @Excel(name = "问题描述")
    @NotBlank(message = "问题描述不能为空", groups = {VAdd.class})
    private String problemDesc;

    /** 是否采纳 1-是 0-否 */
    @Excel(name = "是否采纳 1-是 0-否")
    @NotNull(message = "是否采纳不能为空", groups = {VEdit.class})
    private Integer adoptFlag;

    /** 解决时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "解决时间", width = 30, dateFormat = "yyyy-MM-dd")
    @NotNull(message = "解决时间不能为空", groups = {VEdit.class})
    private Date resolveTime;

    /** 备注 */
    @NotNull(message = "说明不能为空", groups = {VEdit.class})
    private String remark;

    @Override
    @NotNull(message = "唯一主键不能为空" , groups = {VEdit.class})
    public Long getId() {
        return super.getId();
    }
}
